package cn.wolfcode.wolf2w.vo;

import lombok.Getter;
import lombok.Setter;


import java.util.HashMap;
import java.util.Map;

/**
 * Created by 甘静斌 on 2020-08-14 20:42
 */
@Setter
    @Getter
    public class TravelVO {

        private static final Map<Integer,TravelVO> DAYTYPE = new HashMap<>();
        private static final Map<Integer,TravelVO> PEREXPENDTYPE = new HashMap<>();

        static {

            DAYTYPE.put(1, new TravelVO(0,3 ));
            DAYTYPE.put(2, new TravelVO(4,7 ));
            DAYTYPE.put(3, new TravelVO(8,14 ));
            DAYTYPE.put(4, new TravelVO(15,Integer.MAX_VALUE ));


            PEREXPENDTYPE.put(1, new TravelVO(1,999));
            PEREXPENDTYPE.put(2, new TravelVO(1000,6000));
            PEREXPENDTYPE.put(3, new TravelVO(6001,20000 ));
            PEREXPENDTYPE.put(4, new TravelVO(20001,Integer.MAX_VALUE ));
        }

        private int min;
        private int max;

        public TravelVO(int min,int max){

            this.min = min;
            this.max = max;
        }

        public static TravelVO getDay(Integer num){

            return TravelVO.DAYTYPE.get(num);
        }

        public static TravelVO getperExpendType(Integer num){

            return TravelVO.PEREXPENDTYPE.get(num);
        }
}
